package dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBCon {

		private static final String host = "jdbc:mysql://localhost";
//		private static final String port = "3306";
		private static final String port = "8889";
		private static final String db = "scrawler";
		private static final String user = "root";
		private static final String pwd = "root";
//		private static final String user = "sempedia-admin";
//		private static final String pwd = "D3r4G5y";
//		private static final String user = "ankur";
//		private static final String pwd = "wiw2silg";
		
		public Connection getCon() throws InstantiationException, IllegalAccessException, ClassNotFoundException {
			Connection con = null;
			try {
				String url = host + ":" + port + "/" + db;
				Class.forName("com.mysql.jdbc.Driver").newInstance();
				con = DriverManager.getConnection(url, user, pwd);

			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			return con;
		}

	}